CREATE DATABASE vvvStepUp;
GO

USE vvvStepUp;
GO

CREATE TABLE Authors
(
	Id INT NOT NULL IDENTITY(1,1) primary key,
	FirstName NVARCHAR(64) NOT NULL,
	LastName NVARCHAR(64) NOT NULL,
	Location NVARCHAR(64) NOT NULL,
	DOB DATETIME NOT NULL,
	VerificationDocument VARBINARY(MAX) NOT NULL,
	Email VARCHAR(64) NOT NULL,
	[Login] VARCHAR(64) NOT NULL unique,
	[Password] VARCHAR(64) NOT NULL
);

GO

CREATE TABLE Projects 
(
	Id INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
	AuthorId INT NOT NULL REFERENCES Authors(Id),
	Name NVARCHAR(256) NOT NULL,
	[Description] NVARCHAR(MAX) NOT NULL,
	Goal NVARCHAR(512) NOT NULL,
	Mission NVARCHAR(512) NOT NULL,
	Photo VARBINARY(MAX) NOT NULL,
	VideoLink VARCHAR(1024) NOT NULL,
	ExpectedBudget NUMERIC(18,4) NOT NULL,
	UploadedDate DATETIME NOT NULL,
	[ExpireDate] DATETIME NOT NULL
);
GO


